@extends('admin.layouts.base')

@section('title','控制面板')

@section('pageHeader','控制面板')

@section('pageDesc','DashBoard')

@section('content')
    上次刷新时间：<span class="text-danger text-bold">{{date('Y-m-d H:i')}}</span> ，十分钟后自动刷新
    <!-- 操作导航 -->
@include('admin.index.opMenu')
    <section class="content">
        <!-- Small boxes (Stat box) -->
        <h1>Copy</h1>
        <div class="row">
            <div class="col-lg-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-aqua">
                    <div class="inner">
                        <h3>{{$today['cp_count']}}</h3>

                        <p>CopyCount</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-bag"></i>
                    </div>
                    <a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <!-- ./col -->
            <div class="col-lg-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-green">
                    <div class="inner">
                        <h3>{{$today['cp_only_count']}}<sup style="font-size: 20px"></sup></h3>

                        <p>onlyCopy</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-stats-bars"></i>
                    </div>
                    <a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <!-- ./col -->
            <div class="col-lg-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-yellow">
                    <div class="inner">
                        <h3>{{$today['cp_last_five_minutes_count']}}</h3>
                        <p>lastFiveMinutesCopy</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-person-add"></i>
                    </div>
                    <a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <!-- ./col -->
            <div class="col-lg-3 col-xs-6">
                <!-- small box -->
                <div class="small-box bg-red">
                    <div class="inner">
                        <h3>{{$today['cp_last_hour_count']}}</h3>

                        <p>lastHourCopy</p>
                    </div>
                    <div class="icon">
                        <i class="ion ion-pie-graph"></i>
                    </div>
                    <a href="#" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
                </div>
            </div>
            <!-- ./col -->
        </div>
        <!-- /.row -->



<div class="row">
        <div class="col-lg-8 col-xs-12">
            <!-- small box -->
            <div class="box">
                <div class="box-header">
                  <h3 class="box-title">CopyDataTheLast</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body no-padding">
                  <table class="table table-striped">
                    <tbody>
                        <tr>
                      <th>#</th>
                      <th class="hidden-xs">Channel</th>
                      <th class="hidden-xs">Domain</th>
                      <th>Template</th>
                      <th>CreateTime</th>
                      <th>Keyword</th>
                      <th>kfwx</th>
                    </tr>
                        @foreach($today['cp_ip'] as $key=>$obj)
                    <tr>
                      <td>{{$key +1}}.</td>
                      <td class="hidden-xs">{{$obj->channel}}</td>
                      <td class="hidden-xs">{{$obj->domain}}-{{returnAccout($obj->domain)}}</a></td>
                      <td>{{$obj->template}}</td>
                      <td>{{$obj->created_at}}</td>
                      <td><a href="?checkCopyKeywrod=yes&keyword={{$obj->keyword}}">{{$obj->keyword}}</td>
                        <td>{{$obj->kfwx}}</td>
                    </tr>

                    @endforeach
                  </tbody></table>
                </div>
                <!-- /.box-body -->
              </div>
        </div>
        <div class="col-lg-4 col-xs-12">
            <div class="box">
                <div class="box-header">
                  <h3 class="box-title"><a href="?op=checkAllDomain">DomainCopyStatistics---{{$today['cp_only_count']}}</a></h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body no-padding">
                  <table class="table table-condensed">
                    <tbody>
                    <tr>
                      <th>#</th>
                      <th>Domain</th>
                      <th>Progress</th>
                      <th>Count</th>
                      <th>Percent</th>
                    </tr>
                    <input type="hidden" value="{{ $key = 1 }}">
                    @foreach($today['cp_domain_statistics2'] as $keyDomain =>$obj)
                    
                    <tr>
                      <td>{{ $key++ }}.</td>
                      <td><a href="?op=checkdomain&domain={{$keyDomain}}">{{$keyDomain}}-{{returnAccout($keyDomain)}}</a></td>
                      <td>
                        <div class="progress progress-xs">
                          <div class="progress-bar progress-bar-danger" style="width: {{round($obj / $today['cp_only_count'] * 100,0) }}%"></div>
                        </div>
                      </td>
                      <td>{{$obj}}</td>
                      <td><span class="badge @if($key % 4 ===1) bg-red @elseif($key % 4 ===2) bg-yellow @elseif($key % 4 ===3) bg-light-blue @elseif($key % 4 ===0) bg-green @endif">{{round($obj / $today['cp_only_count'] * 100,0)  }}%</span></td>
                    </tr>
                    @endforeach
                    
                  </tbody></table>
                </div>
                <!-- /.box-body -->
              </div>
        </div>
         <!-- ./col -->
</div>
       <!-- /.row -->
       <h1>Channel&Template</h1>
       <div class="row">
          <div class="col-lg-6 col-xs-12">
              <div class="box">
                  <div class="box-header">
                    <h3 class="box-title">ChannelCopyStatistics</h3>
                  </div>
                  <!-- /.box-header -->
                  <div class="box-body no-padding">
                    <table class="table table-condensed">
                      <tbody>
                      <tr>
                        <th>#</th>
                        <th>Channel</th>
                        <th>Progress</th>
                        <th>Count</th>
                        <th>Percent</th>
                      </tr>
                      @foreach($today['cp_channel_statistics'] as $key=>$obj)
                      <tr>
                        <td>{{$key +1}}.</td>
                        <td>{{$obj->channel}}</td>
                        <td>
                          <div class="progress progress-xs">
                            <div class="progress-bar progress-bar-danger" style="width: {{round($obj->count / $today['cp_count'] * 100,0) }}%"></div>
                          </div>
                        </td>
                        <td>{{$obj->count}}</td>
                        <td><span class="badge @if($key % 4 ===1) bg-red @elseif($key % 4 ===2) bg-yellow @elseif($key % 4 ===3) bg-light-blue @elseif($key % 4 ===0) bg-green @endif">{{round($obj->count / $today['cp_count'] * 100,0)  }}%</span></td>
                      </tr>
                      @endforeach
                      
                    </tbody></table>
                  </div>
                  <!-- /.box-body -->
                </div>
          </div>

          <div class="col-lg-6 col-xs-12">
              <div class="box">
                  <div class="box-header">
                    <h3 class="box-title">ChannelNew</h3>
                  </div>
                  <!-- /.box-header -->
                  <div class="box-body no-padding">
                    <table class="table table-condensed">
                      <tbody>
                      <tr>
                        
                        <th>Channel</th>
                        
                        <th>Count</th>
                       
                      </tr>
                      @foreach($today['cp_channel_statistics2'] as $key=>$obj)
                      <tr>
                        
                        <td>{{$key}}</td>
                        <td>{{$obj}}</td>
                      </tr>
                      @endforeach
                      
                    </tbody></table>
                  </div>
                  <!-- /.box-body -->
                </div>
          </div>
          


           
       </div>

      <h1>TemplateCopyStatistics</h1>
      <div class="row">
        <div class="col-lg-6 col-xs-12">
            <div class="box">
                <div class="box-header">
                  <h3 class="box-title">TemplateCopyStatistics</h3>
                </div>
                <!-- /.box-header -->
                <div class="box-body no-padding">
                  <table class="table table-condensed">
                    <tbody>
                    <tr>
                      <th>#</th>
                      <th>Template</th>
                      <th>Progress</th>
                      <th>Count</th>
                      <th>Percent</th>
                    </tr>
                    @foreach($today['cp_template_statistics'] as $key=>$obj)
                    <tr>
                      <td>{{$key +1}}.</td>
                      <td>{{$obj->template}}</td>
                      <td>
                        <div class="progress progress-xs">
                          <div class="progress-bar progress-bar-danger" style="width: {{round($obj->count / $today['cp_count'] * 100,0) }}%"></div>
                        </div>
                      </td>
                      <td>{{$obj->count}}</td>
                      <td><span class="badge @if($key % 4 ===1) bg-red @elseif($key % 4 ===2) bg-yellow @elseif($key % 4 ===3) bg-light-blue @elseif($key % 4 ===0) bg-green @endif">{{round($obj->count / $today['cp_count'] * 100,0)  }}%</span></td>
                    </tr>
                    @endforeach
                    
                  </tbody></table>
                </div>
                <!-- /.box-body -->
              </div>
        </div>

          <div class="col-lg-6 col-xs-12">
              <div class="box">
                  <div class="box-header">
                    <h3 class="box-title">TemplateCopyStatisticsNew</h3>
                  </div>
                  <!-- /.box-header -->
                  <div class="box-body no-padding">
                    <table class="table table-condensed">
                      <tbody>
                      <tr>
                        <th>Template</th>
                        
                        <th>Count</th>
                        
                      </tr>
                      @foreach($today['cp_template_statistics2'] as $key=>$obj)
                      <tr>
                        <td>{{$key}}</td>
                        
                        <td>{{$obj}}</td>
                        
                      </tr>
                      @endforeach
                      
                    </tbody></table>
                  </div>
                  <!-- /.box-body -->
                </div>
          </div>
      </div>




        </div>


          <!-- /.row -->
    </section>

@endsection


@section('js')

@endsection
{{header("Refresh: 600")}}